import React, { lazy } from 'react'
import {
  HomeOutlined,
  FileTextOutlined,
  AppstoreOutlined,
  CopyOutlined,
  FileOutlined,
  CodepenOutlined,
  FileMarkdownOutlined,
  FilePdfOutlined,
  InteractionOutlined,
  FileWordOutlined,
  GlobalOutlined,
  MessageOutlined,
} from '@ant-design/icons'

const Doc = lazy(() => import(/* webpackChunkName: "Doc" */ '@/views/doc/Doc'))
const Dashboard = lazy(() => import(/* webpackChunkName: "Dashboard" */ '@/views/dashboard/Dashboard'))
const Guide = lazy(() => import(/* webpackChunkName: "Guide" */ '@/views/guide/Guide'))
const Clipboard = lazy(() => import(/* webpackChunkName: "Clipboard" */ '@/views/clipboard/Clipboard'))
// const TextEditor = lazy(() => import(/* webpackChunkName: "TextEditor" */ '@/views/components/TextEditor'))
const Toast = lazy(() => import(/* webpackChunkName: "Toast" */ '@/views/components/Toast'))
// const Markdown = lazy(() => import(/* webpackChunkName: "Markdown" */ '@/views/components/Markdown'))
const AtDemo = lazy(() => import(/* webpackChunkName: "AtDemo" */ '@/views/components/AtDemo'))
const Error404 = lazy(() => import(/* webpackChunkName: "404" */ '@/views/error/404'))
const Pdf = lazy(() => import(/* webpackChunkName: "Pdf" */ '@/views/pages/Pdf'))
const Office = lazy(() => import(/* webpackChunkName: "Office" */ '@/views/pages/Office'))
const Print = lazy(() => import(/* webpackChunkName: "Print" */ '@/views/pages/Print/'))

const router = [
  // { id: 1, title: '首页', icon: <HomeOutlined />, path : '/', exact: true, name: 'Home' },
  { title: '公告板', icon: <HomeOutlined />, path: '/dashboard', name: 'Dashboard', component: Dashboard },
  { title: '文档', icon: <FilePdfOutlined />, path: '/doc', name: 'Doc', component: Doc },
  { title: '引导页', icon: <InteractionOutlined />, path: '/guide', name: 'Guide', component: Guide },
  {
    title: '组件',
    icon: <AppstoreOutlined />,
    name: 'Components',
    path: '/components',
    children: [
      {
        title: '轻量提示 Toast',
        icon: <MessageOutlined />,
        path: '/components/toast',
        component: Toast
      },
      // {
      //   title: '富文本 Editor',
      //   icon: <CodepenOutlined />,
      //   path: '/components/textEditor',
      //   component: TextEditor
      // },
      // {
      //   title: 'Markdown',
      //   icon: <FileMarkdownOutlined />,
      //   path: '/components/markdown',
      //   component: Markdown
      // },
      {
        title: '圈圈 at',
        icon: <FileTextOutlined />,
        path: '/components/at',
        component: AtDemo
      },
    ]
  },
  {
    title: '页面',
    icon: <GlobalOutlined />,
    name: 'Pages',
    path: '/pages',
    children: [
      {
        title: 'PDF',
        icon: <FilePdfOutlined />,
        path: '/pages/pdf',
        component: Pdf
      },
      {
        title: 'Office',
        icon: <FileWordOutlined />,
        path: '/pages/office',
        component: Office
      },
      {
        title: '打印 print',
        icon: <FileTextOutlined />,
        path: '/pages/print',
        component: Print
      },
    ]
  },
  { title: '剪贴板', icon:<CopyOutlined />, path: '/clipboard', name: 'Clipboard', component: Clipboard },
  {
    title: '错误页面',
    path: '/error/404',
    name: 'Error',
    icon: <FileOutlined />,
    children: [
      {
        title: '404',
        path: '/error/404',
        icon: <FileTextOutlined />,
        component: Error404
      },
    ]
  },
]

export default router

